<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta property="og:type" content="website">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="http://example.com/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main">
  
    <article id="post-025uniapp-done" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/24/025uniapp-done/" class="article-date">
  <time class="dt-published" datetime="2023-03-24T03:19:36.000Z" itemprop="datePublished">2023-03-24</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/24/025uniapp-done/">025uniapp-done</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>hbuilderx打开的Chrome的搜索引擎无法修改</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/24/025uniapp-done/" data-id="clfmbqvr0000ds8aaarvoe6pv" data-title="025uniapp-done" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-024uniapp第三天" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/23/024uniapp%E7%AC%AC%E4%B8%89%E5%A4%A9/" class="article-date">
  <time class="dt-published" datetime="2023-03-23T09:29:57.000Z" itemprop="datePublished">2023-03-23</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/23/024uniapp%E7%AC%AC%E4%B8%89%E5%A4%A9/">024uniapp第三天</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>系统学习第三天哦，进度到做一个新闻案例，马上结尾了。</p>
<p><img src="/024uniapp%E7%AC%AC%E4%B8%89%E5%A4%A9/%E6%96%B0%E9%97%BB%E6%A1%88%E4%BE%8B%E7%BD%91%E9%A1%B5.png" alt="新闻案例网页"></p>
<h1 id="免费api"><a href="#免费api" class="headerlink" title="免费api"></a>免费api</h1><p>获取狗子图片：<a target="_blank" rel="noopener" href="http://dog.ceo/api/breeds/image/random">http://dog.ceo/api/breeds/image/random</a></p>
<p>获取猫咪图片：<a target="_blank" rel="noopener" href="http://api.thecatapi.com/v1/images/search?limit=1">http://api.thecatapi.com/v1/images/search?limit=1</a><br><code>limit</code>如果不等于1，则会返回10张图片</p>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>这三天系统学习uniapp，明天就能结束了。我发现网页上的图片无法显示，在本地上是能看到的，怀疑是gitee用的hexo版本太低了，不支持最新的hexo3的引入图片的功能。下面测试一下，先把图片放在gitee的仓库中，能不能正常查看：</p>
<p><img src="https://gitee.com/t0o-yang/t0o-yang/raw/hexo/source/_posts/024uniapp%E7%AC%AC%E4%B8%89%E5%A4%A9/%E6%96%B0%E9%97%BB%E6%A1%88%E4%BE%8B%E7%BD%91%E9%A1%B5.png" alt="新闻案例网页"></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/23/024uniapp%E7%AC%AC%E4%B8%89%E5%A4%A9/" data-id="clfl8adym0000doaahos4c75r" data-title="024uniapp第三天" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-023gitee-hexo搭建个人博客" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T15:53:14.000Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/22/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/">023gitee+hexo搭建个人博客</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>日志，各位看官就当乐子看吧。</p>
<p><strong>正经人谁写日记啊？！！</strong>    ——鹅城县长</p>
<p>今天uniapp的学习进度到了<code>showModal</code>，其次是在码云上重新搭了博客。介绍工具、记录一下过程。改用个人博客，也是因为这几天写的只能算日志，不算技术博客，还是放在个人网站上比较好。</p>
<h2 id="技术选型"><a href="#技术选型" class="headerlink" title="技术选型"></a>技术选型</h2><h3 id="静态网站工具"><a href="#静态网站工具" class="headerlink" title="静态网站工具"></a>静态网站工具</h3><p>gitee上的Page服务中提到了<code>Jekyll</code>、<code>Hugo</code>、<code>Hexo</code>三种。虽然<code>Hexo</code>的部署过程最慢（<a target="_blank" rel="noopener" href="https://gitee.com/help/articles/4136#article-header0">官方说的</a>），但是个人只用过<code>Hexo</code>，所以选择了Hexo。</p>
<h3 id="服务提供商"><a href="#服务提供商" class="headerlink" title="服务提供商"></a>服务提供商</h3><p><code>gitee</code>和<code>github</code>两个。gitee码云，国内的服务商，访问会更稳定。但是使用gitee有个缺点，<code>hexo g -d</code>没法自动部署，每次都需要上网站更新部署，下面会提到（不知道github会不会有这种情况）。</p>
<h1 id="gitee-hexo搭建"><a href="#gitee-hexo搭建" class="headerlink" title="gitee+hexo搭建"></a>gitee+hexo搭建</h1><p>参考：<a target="_blank" rel="noopener" href="https://www.zhihu.com/question/21193762/answer/79109280">使用hexo，如果换了电脑怎么更新博客？ - CrazyMilk的回答 - 知乎</a>，以前在github上用过Hexo搭建过博客，换设备后，想用这个网站接着写，发现github的仓库中只保留了生成的静态网页，也就是说<code>hexo</code>配置过程要重新弄，连接远程仓库，没有原文档，重新部署的话，旧的博客不就没了吗？所以这次重新使用<code>hexo</code>格外关注这个的解决方案。不想上传配置文件的，看这篇文章：<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_45631738/article/details/104716374">使用hexo+gitee搭建博客</a><br>回到文章内容，参考文章是用github的，那我就把gitee的过程写一下。</p>
<h2 id="1-准备好远程仓库"><a href="#1-准备好远程仓库" class="headerlink" title="1.准备好远程仓库"></a>1.准备好远程仓库</h2><p>创建步骤就不细聊了，跟着页面提示走。注意两个点：</p>
<ol>
<li>仓库名最好是账号的初始名称（如果改过名，可打开个人主页，头像下方‘@’的一串字符就是名称），如果仍想用别的名字，就需要配置一下样式的路径，否则网页没有样式，显示效果很丑。</li>
</ol>
<p><img src="/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/%E9%85%8D%E7%BD%AE%E6%A0%B7%E5%BC%8F.png" alt="配置样式"></p>
<ol start="2">
<li>设置两个分支<code>master</code>和<code>hexo</code>，hexo存放网站的原始文件，包括配置等；master存放生成的静态网页。最后将<code>hexo</code>设置成默认分支。</li>
</ol>
<h2 id="2-准备本地仓库"><a href="#2-准备本地仓库" class="headerlink" title="2.准备本地仓库"></a>2.准备本地仓库</h2><p>克隆远程仓库</p>
<h2 id="3-准备hexo"><a href="#3-准备hexo" class="headerlink" title="3.准备hexo"></a>3.准备hexo</h2><ol>
<li>安装，打开<code>git bash</code>全局安装hexo：<code>npm i hexo-cli -g</code></li>
<li>初始化，在<code>项目文件名a</code>的<strong>外一层</strong>用<code>hexo init 临时文件名b</code>初始化一个<code>hexo</code>项目。hexo init使用的文件夹<strong>必须是空</strong>，所以先在其它地方初始化，然后复制到本地仓库中。</li>
<li>复制，把<code>临时文件名a</code>文件夹中自动生成的所有文件复制到<code>项目文件名a</code>文件夹中。生成的文件大致有以下这些。</li>
</ol>
<p><img src="/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/%E4%B8%B4%E6%97%B6%E6%96%87%E4%BB%B6.png" alt="临时文件"></p>
<ol start="4">
<li>下载hexo的依赖包，回到本地仓库的目录下，执行<code>npm i</code><blockquote>
<p>注意：之后所有操作都在<code>hexo</code>分支下。</p>
</blockquote>
</li>
<li>下载<code>hexo-deployer-git</code>，hexo部署到git上的工具包，执行<code>npm i hexo-deployer-git</code>。</li>
<li>修改分支为master，<code>repo</code>改为自己的远程仓库，<code>branch</code>等于<code>master</code>。</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Deployment</span></span><br><span class="line"><span class="comment">## Docs: https://hexo.io/docs/one-command-deployment</span></span><br><span class="line">deploy:</span><br><span class="line">  <span class="built_in">type</span>: git</span><br><span class="line">  repo: git@gitee.com:t0o-yang/t0o-yang.git</span><br><span class="line">  branch: master</span><br></pre></td></tr></table></figure>

<h2 id="4-部署上线"><a href="#4-部署上线" class="headerlink" title="4.部署上线"></a>4.部署上线</h2><ol>
<li>依次执行<code>git add .</code>、<code>git commit -m &quot;...&quot;</code>、<code>git push origin hexo</code>提交网站相关的文件；</li>
<li>执行<code>hexo g -d</code>生成网站并部署<blockquote>
<p>访问gitee上的博客，发现并没有自动更新，只能到gitee上手动操作。不知道github有没有这种问题</p>
</blockquote>
</li>
</ol>
<h1 id="如何使用"><a href="#如何使用" class="headerlink" title="如何使用"></a>如何使用</h1><p>使用<code>hexo new 文章名</code>新建文章，会自动生成md文件。或者，在本地仓库的 <code>/source/_posts</code> 目录下直接新建md文件。建议用命令生成。命令生成会根据设定的模板生成内容，如标题、时间等等，不需要自己写了。同时也能直接生成资源文件夹，存放图片等等内容。</p>
<h2 id="启用资源文件夹"><a href="#启用资源文件夹" class="headerlink" title="启用资源文件夹"></a>启用资源文件夹</h2><p>在<code>_config.yml</code>中修改<code>post_asset_folder</code>，并添加一些配置。</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">post_asset_folder: true # 图像等资源访问</span><br><span class="line">marked: # 启用后，资源图片将会被自动解析为其对应文章的路径，直接用md语法</span><br><span class="line">  prependRoot: true</span><br><span class="line">  postAsset: true</span><br></pre></td></tr></table></figure>

<p>在文章中直接用<code>![](图片路径)</code>就可以放置图片了。更多内容，看<a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/docs/asset-folders">官方文档</a>.</p>
<h2 id="增加标签和分栏"><a href="#增加标签和分栏" class="headerlink" title="增加标签和分栏"></a>增加标签和分栏</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: 023gitee+hexo搭建个人博客</span><br><span class="line"><span class="built_in">date</span>: 2023-03-22 23:53:14</span><br><span class="line">tags: [uniapp,hexo]</span><br><span class="line">categories: 百日博客计划</span><br><span class="line">description: 系统学习uniapp第二天，搭建个人博客</span><br><span class="line">---</span><br></pre></td></tr></table></figure>

<p>文章开头增加这些代码，其中，<code>tags</code>是数组，表示有多个标签；只有一个标签，直接写标签名就行了；categories表示分栏（分类），只有一个值时，表示一个分栏；如果是数组，想<code>categories: [a, b]</code>，则表示文章在<code>a</code>栏目下的<code>b</code>子栏目下，如下。</p>
<p><img src="/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/%E7%88%B6%E5%AD%90%E6%A0%8F%E7%9B%AE.png" alt="父子栏目"></p>
<p>同属多个栏目的语法，还没找到…</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/" data-id="clfjxfiot00008oaa0d25f1z5" data-title="023gitee+hexo搭建个人博客" class="article-share-link">Share</a>
      
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/hexo/" rel="tag">hexo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/uniapp/" rel="tag">uniapp</a></li></ul>

    </footer>
  </div>
  
</article>



  
    <article id="post-如何使用MDN文档" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8MDN%E6%96%87%E6%A1%A3/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.866Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>如何更好的使用MDN Web文档，在查阅文档的过程中，按照参考文献一路往下看，基本最后都会指向MDN网站的一个冷门文档。这篇文章就是为了记录那些有用的文档。</p>
<table>
<thead>
<tr>
<th>内容</th>
<th>介绍</th>
<th>链接</th>
</tr>
</thead>
<tbody><tr>
<td>Web 相关术语的定义</td>
<td>web专业术语的定义，对面试、写博客都用帮助</td>
<td><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Glossary">https://developer.mozilla.org/zh-CN/docs/Glossary</a></td>
</tr>
<tr>
<td>JavaScript 使用指南</td>
<td>介绍如何使用 JavaScript，并且给出了语言概述</td>
<td><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide">https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide</a></td>
</tr>
</tbody></table>
<h1 id="Web-相关术语的定义"><a href="#Web-相关术语的定义" class="headerlink" title="Web 相关术语的定义"></a>Web 相关术语的定义</h1><p><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Glossary">https://developer.mozilla.org/zh-CN/docs/Glossary</a></p>
<h1 id="JavaScript-使用指南"><a href="#JavaScript-使用指南" class="headerlink" title="JavaScript 使用指南"></a>JavaScript 使用指南</h1><p><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide">https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8MDN%E6%96%87%E6%A1%A3/" data-id="clfjqowui000newaa6h7s9k2u" data-title="" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-前端面试题" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95%E9%A2%98/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.862Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前端"><a href="#前端" class="headerlink" title="前端"></a>前端</h1><h2 id="ES6"><a href="#ES6" class="headerlink" title="ES6"></a>ES6</h2><h3 id="var、let和const"><a href="#var、let和const" class="headerlink" title="var、let和const"></a>var、let和const</h3><p>var、let、const都是声明变量的关键词，主要区别是</p>
<ol>
<li><p>变量提升，var声明的变量会出现变量提升的情况，即可以在声明前使用变量；let和const声明前使用会报错；</p>
</li>
<li><p>暂时性死区，var不存在，let和const存在，在声明语句之前，不能获取和设置变量；</p>
</li>
<li><p>作用域不同，let和const作用于块级作用域，var作用于函数作用域；</p>
</li>
<li><p>重新赋值，const声明的是一个常量，值不能改变。let，var可以；</p>
</li>
<li><p>重复声明，let和const在同一作用域内不能重复声明，var不限制；</p>
</li>
</ol>
<h3 id="数组的扩展"><a href="#数组的扩展" class="headerlink" title="数组的扩展"></a>数组的扩展</h3><ol>
<li><p><code>...</code>扩展运算符，可将数组变成逗号分割的参数序列，常用于函数调用</p>
</li>
<li><p>新增两个创建数组的方法：Array.from()将类数组对象和可遍历对象转化为真正的数组，，Array.of()类似Array构造函数的功能，但是参数个数不同不会有不同结果</p>
</li>
<li><p>新增的实例对象方法</p>
<ol>
<li><p>遍历：keys, values, entries。这也是对象的遍历方式，因为数组是个特殊的对象，所以能用</p>
</li>
<li><p>查找：find 返回数组中第一个满足条件的成员, findIndex 返回数组中第一个满足条件的成员的位置，includes 判断是否包含给定值</p>
</li>
<li><p>修改: copyWithin 在当前数组内部将指定位置的成员复制到其他位置, fill 使用给定值填充一个数组</p>
</li>
<li><p>转化： flat 展开嵌套的数组，返回一个新数组， flatMap 对数组的每个成员执行一个函数，然后对返回值组成的数组执行 flat 方法，只展开一层</p>
</li>
</ol>
</li>
</ol>
<h3 id="对象的扩展"><a href="#对象的扩展" class="headerlink" title="对象的扩展"></a>对象的扩展</h3><ol>
<li><p>属性简写，可以将变量和函数名直接写在大括号内，作为对象的属性和方法</p>
</li>
<li><p>属性名表达式，在中括号内写表达式，在es6中允许在用字面量定义对象时，用表达式的形式表示属性名</p>
</li>
<li><p><code>...</code> 对象的扩展运算符，取出参数对象的所有可遍历属性，拷贝到当前对象中，常用于复制对象</p>
</li>
<li><p>super 关键词，指向当前对象的原型对象</p>
</li>
<li><p>遍历对象的属性</p>
<ol>
<li><p>for…in 遍历自身和继承的的可枚举</p>
</li>
<li><p>keys 自身的可枚举的，不含继承的</p>
</li>
<li><p>getOwnPropertyNames 自身所有属性，含不可枚举的</p>
</li>
<li><p>getOwnPropertySymbols 自身的所有 Symbols 属性的键名</p>
</li>
<li><p>Reflect.ownKeys 自身所有键名（不论 symbols 还是 可枚举），不含继承的</p>
</li>
</ol>
<p>遍历对象的键名，都遵守同样的属性遍历的次序规则：首先遍历数值键，按照数值升序；其次遍历字符串键，按加入时间升序；最后遍历 symbols 键，按加入时间升序</p>
</li>
<li><p>对象新增的方法：</p>
<ol>
<li><p>遍历：Object.keys, Object.values, Object.entries</p>
</li>
<li><p>改：Object.assign 合并对象，将源对象合并到目标对象，浅拷贝</p>
</li>
<li><p>转化：Object.fromEntries entries的逆操作，将键值对数组转化成对象</p>
</li>
<li><p>Object.is 对比方法，相对于 &#x3D;&#x3D;&#x3D; ,区别是 is 中，+0不等于-0，NaN等于NaN。&#x3D;&#x3D;&#x3D; 相反</p>
</li>
<li><p>Object.setPrototypeOf 设置原型，Object.getPrototypeOf 获取原型。Object.getOwnPropertyDescriptors 获取自身属性描述</p>
</li>
</ol>
</li>
</ol>
<h2 id="JavaScript"><a href="#JavaScript" class="headerlink" title="JavaScript"></a>JavaScript</h2><h3 id="数组常用方法"><a href="#数组常用方法" class="headerlink" title="数组常用方法"></a>数组常用方法</h3><ul>
<li><p>数组基本操作有，push\unshift\concat,用于数组添加；pop\shift\slice,用于数组删除；splice用于修改数组；indexOf用于查找数组，es6中增加了find、includes；</p>
</li>
<li><p>用于排序的方法，有 reverse、sort</p>
</li>
<li><p>用于数组的转换有 join ，将数组转变为字符串，参数是字符串分割符</p>
</li>
<li><p>遍历相关的方法有 some、every、foreach、filter、map、reduce</p>
</li>
</ul>
<p>方法细节：</p>
<p>push：接收多个参数，并添加到目标数组的末尾，返回数组最新长度</p>
<p>unshift: 接收多个参数，并添加到目标数组的开头，返回数组最新长度</p>
<p>concat: 将目标数组和参数合并到一个数组中，返回一个新数组，<strong>不改变原数组</strong></p>
<p>pop：删除数组最后一个成员，返回删除的项</p>
<p>shift：删除数组第一项，返回删除的项</p>
<p>slice：获取数组的部分，并将其返回，<strong>不改变原数组</strong></p>
<p>splice：删除数组的一部分元素，并在删除的位置上添加新的元素。splice(start,0,item),在 start 位置前添加 item ；splice(0,delCount) 删除 delCount 个数组成员，返回被删除的元素。</p>
<p>indexOf: 返回给定元素在数组中第一次出现的位置，如果没有返回 -1，不能找 NaN </p>
<p>find：找到第一个符合条件的数组成员，如果没有返回 undefined，参数是一个回调函数，所有成员依次执行该函数，直到找到第一个返回值为 true 的成员</p>
<p>includes： 判断数组中是否包含给定的一个值，false和0不相等，使用零值相等算法确定是否找到元素</p>
<p>区别：indexOf 不能找 NaN，find，includes 可以</p>
<p>sort：对数组排序，默认按照字典顺序排序</p>
<p>reverse：颠倒数组排序，返回改变后的数组</p>
<p>join：已给定的分隔符，将数组成员连成字符串返回，默认用逗号。undefined、null和空位都会变换成空字符串</p>
<p>some、every： 判断数组成员是否满足某个条件，some只要一个成员返回值为 true 则 some 返回 true；every 则需要所有成员返回 true。空数组 some 返回 false ，every 返回 true</p>
<p>forEach，map：对所有成员执行参数函数，forEach没有返回值，map有，<strong>不改变原数组</strong></p>
<p>filter：对所有成员执行参数函数，过滤出返回值为 true 的数组成员，返回一个新数组，<strong>不改变原数组</strong></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95%E9%A2%98/" data-id="clfjqowuh000mewaa5y9j8htb" data-title="" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-022系统学习uniapp" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/022%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0uniapp/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.857Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/22/022%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0uniapp/">022系统学习uniapp</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>日志，各位看官就当乐子看吧。</p>
<p><strong>正经人谁写日记啊？！！</strong>    ——鹅城县长</p>
<p>系统学习一下uniapp的使用，正好找的教程的项目都是基于vue2的，刚好学习一下vue2的语法。</p>
<h1 id="uniapp、vue项目区别"><a href="#uniapp、vue项目区别" class="headerlink" title="uniapp、vue项目区别"></a>uniapp、vue项目区别</h1><h2 id="自定义组件"><a href="#自定义组件" class="headerlink" title="自定义组件"></a>自定义组件</h2><ol>
<li>在uni-app工程根目录下的 components 目录，创建并存放自定义组件：</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">│─components            	符合vue组件规范的uni-app组件目录</span><br><span class="line">│  └─componentA         	符合‘components/组件名称/组件名称.vue’目录结构，easycom方式可直接使用组件</span><br><span class="line">│  		└─componentA.vue    可复用的componentA组件</span><br><span class="line">│  └─component-a.vue      可复用的component-a组件</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong>必须components目录下，创建同名组件的同名目录</strong></p>
<ol start="2">
<li>直接使用，区别于vue2的引入再注册</li>
</ol>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">&lt;!-- 在index.<span class="property">vue</span>引入 uni-badge 组件--&gt;</span><br><span class="line"><span class="language-xml"><span class="tag">&lt;<span class="name">template</span>&gt;</span></span></span><br><span class="line"><span class="language-xml">    <span class="tag">&lt;<span class="name">view</span>&gt;</span></span></span><br><span class="line"><span class="language-xml">        <span class="tag">&lt;<span class="name">uni-badge</span> <span class="attr">text</span>=<span class="string">&quot;1&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">uni-badge</span>&gt;</span><span class="comment">&lt;!-- 3.使用组件 --&gt;</span></span></span><br><span class="line"><span class="language-xml">    <span class="tag">&lt;/<span class="name">view</span>&gt;</span></span></span><br><span class="line"><span class="language-xml"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></span></span><br><span class="line"><span class="language-xml"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">    <span class="comment">// 这里不用import引入，也不需要在components内注册uni-badge组件。template里就可以直接用</span></span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">    <span class="keyword">export</span> <span class="keyword">default</span> &#123;</span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">        <span class="title function_">data</span>(<span class="params"></span>) &#123;</span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">            <span class="keyword">return</span> &#123;</span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">            &#125;</span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">        &#125;</span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml">    &#125;</span></span></span><br><span class="line"><span class="language-javascript"><span class="language-xml"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span></span><br></pre></td></tr></table></figure>

<h1 id="彩蛋"><a href="#彩蛋" class="headerlink" title="彩蛋"></a>彩蛋</h1><p>以前在github上用<code>hexo</code>做了个人博客，访问：<a target="_blank" rel="noopener" href="https://t0o-yang.github.io/">个人博客</a>。还挺快的，但已经忘了怎么使用了！电脑也换了。明天用gitee重新整一个。之后博客就放在那了。</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/022%E7%B3%BB%E7%BB%9F%E5%AD%A6%E4%B9%A0uniapp/" data-id="clfjqowuh000lewaag4mj1bsy" data-title="022系统学习uniapp" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-021todos初版" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/021todos%E5%88%9D%E7%89%88/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.849Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/22/021todos%E5%88%9D%E7%89%88/">021todos初版</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>日志，各位看官就当乐子看吧。</p>
<p><strong>正经人谁写日记啊？！！</strong>    ——鹅城县长</p>
<h1 id="todos"><a href="#todos" class="headerlink" title="todos"></a>todos</h1><p>项目初版基本好了，代码中保留了<code>axios</code>的代码，之后找找如何正确在<code>uniapp</code>中使用<code>axios</code>。</p>
<p>使用组件的一个难点就是很难操作其生成的dom对象。</p>
<p>有两个需求，没实现：</p>
<ol>
<li>当事项完成时，<code>uni-easyinput</code>生成的<code>input</code>能加上删除线，即<code>text-decoration:line-through;</code><br> 方案是操作dom，但是只限于h5平台，微信小程序中，无法使用DOM，然后尝试用uniapp内置的获取节点方法<code>uni.createSelectorQuery()</code>，但取不到对应的input（h5下，是通过给组件绑定id，但是微信下，根本没有id属性）； <figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 获取dom，添加删除线</span></span><br><span class="line"><span class="keyword">const</span> input=<span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">&#x27;#todo-&#x27;</span>+todo.<span class="property">_id</span>).<span class="title function_">querySelector</span>(<span class="string">&quot;input.uni-input-input&quot;</span>)</span><br><span class="line"><span class="keyword">if</span>(input.<span class="title function_">getAttribute</span>(<span class="string">&#x27;style&#x27;</span>)==<span class="literal">null</span>) &#123;</span><br><span class="line">    input.<span class="title function_">setAttribute</span>(<span class="string">&#x27;style&#x27;</span>,<span class="string">&#x27;text-decoration:line-through;&#x27;</span>)</span><br><span class="line">&#125;<span class="keyword">else</span>&#123;</span><br><span class="line">    input.<span class="title function_">removeAttribute</span>(<span class="string">&#x27;style&#x27;</span>)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li>
<li>数据初始化后，根据事项完成状态，添加删除线<br> 方案是操作dom, 在mounted中，获取生成的dom对象。结果发现没有获取到。</li>
<li>使用<code>axios</code>发送请求<br> 实际中也有需要将vue项目改造成uniapp项目，除了改组件，JS代码都是希望仅可能复用的，找了第三方插件，如<code>uniapp-axios-adapter</code>，没实现。说一下使用过程，大家看看哪里不对：<ol>
<li><p>安装<code>npm i axios@0.27.2</code>， <code>npm i uniapp-axios-adapter</code></p>
</li>
<li><p><code>main.js</code>中配置全局API，按照原先vue项目的使用习惯</p>
<ol>
<li>配置  <figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// main.js        </span></span><br><span class="line"><span class="keyword">import</span> request <span class="keyword">from</span> <span class="string">&quot;/common/http.js&quot;</span>;</span><br><span class="line"><span class="comment">// ...</span></span><br><span class="line"><span class="keyword">const</span> app = <span class="keyword">new</span> <span class="title class_">Vue</span>(&#123;</span><br><span class="line">...<span class="title class_">App</span></span><br><span class="line">&#125;)</span><br><span class="line"></span><br><span class="line">app.$mount()</span><br><span class="line"><span class="comment">// axios 全局引用</span></span><br><span class="line">app.<span class="property">config</span>.<span class="property">globalProperties</span>.<span class="property">$axios</span> = request;</span><br></pre></td></tr></table></figure>
  <code>http.js</code>文件  <figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// /common/http.js</span></span><br><span class="line"><span class="keyword">import</span> axios <span class="keyword">from</span> <span class="string">&quot;uniapp-axios-adapter&quot;</span>;</span><br><span class="line"><span class="keyword">const</span> request = axios.<span class="title function_">create</span>(&#123;</span><br><span class="line"><span class="attr">baseURL</span>: <span class="string">&quot;http://127.0.0.1:3000&quot;</span>,</span><br><span class="line"><span class="attr">timeout</span>: <span class="number">10000</span>,</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line">request.<span class="property">interceptors</span>.<span class="property">request</span>.<span class="title function_">use</span>(<span class="function">(<span class="params">config</span>) =&gt;</span> &#123;</span><br><span class="line"><span class="comment">//带上token</span></span><br><span class="line"><span class="comment">// config.headers[&quot;Authorization&quot;] = &quot;token&quot;;</span></span><br><span class="line"><span class="keyword">return</span> config;</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line">request.<span class="property">interceptors</span>.<span class="property">response</span>.<span class="title function_">use</span>(<span class="function">(<span class="params">response</span>) =&gt;</span> &#123;</span><br><span class="line"><span class="comment">// 统一处理响应,返回Promise以便链式调用</span></span><br><span class="line"><span class="keyword">if</span> (response.<span class="property">status</span> === <span class="number">200</span>) &#123;</span><br><span class="line">    <span class="keyword">const</span> &#123; data &#125; = response;</span><br><span class="line">    <span class="keyword">if</span> (data &amp;&amp; data.<span class="property">code</span> === <span class="number">200</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">resolve</span>(data);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">reject</span>(data);</span><br><span class="line">    &#125;</span><br><span class="line">&#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Promise</span>.<span class="title function_">reject</span>(response);</span><br><span class="line">&#125;</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> request;</span><br></pre></td></tr></table></figure></li>
<li>使用，直接调post或者按照文档方式都结果失败了 <figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 直接调</span></span><br><span class="line">axios.<span class="title function_">post</span>(<span class="string">&#x27;/task-modify&#x27;</span>, &#123;</span><br><span class="line">    <span class="attr">id</span>: <span class="variable language_">this</span>.<span class="property">todos</span>[index].<span class="property">_id</span>,</span><br><span class="line">    <span class="attr">title</span>: editText</span><br><span class="line">&#125;).<span class="title function_">then</span>()</span><br><span class="line"><span class="comment">// 文档案例的方式</span></span><br><span class="line"><span class="variable language_">this</span>.$axios(&#123;</span><br><span class="line">    <span class="attr">method</span>: <span class="string">&#x27;get&#x27;</span>,</span><br><span class="line">    <span class="attr">url</span>: <span class="string">&quot;/task-del&quot;</span>,</span><br><span class="line">    <span class="attr">params</span>: &#123;</span><br><span class="line">        <span class="attr">id</span>: <span class="variable language_">this</span>.<span class="property">todos</span>[delIndex].<span class="property">_id</span></span><br><span class="line">    &#125;</span><br><span class="line">&#125;).<span class="title function_">then</span>()</span><br></pre></td></tr></table></figure></li>
</ol>
</li>
<li><p>采取了直接使用的方式</p>
 <figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 官方文档的使用案例</span></span><br><span class="line"><span class="keyword">import</span> axios <span class="keyword">from</span> <span class="string">&quot;uniapp-axios-adapter&quot;</span>;</span><br><span class="line">axios.<span class="title function_">get</span>(&#123;</span><br><span class="line">    <span class="attr">url</span>: <span class="string">&quot;https://example.com/api/getUserById&quot;</span>,</span><br><span class="line">    <span class="attr">params</span>: &#123;</span><br><span class="line">        <span class="attr">id</span>: <span class="number">1</span>,</span><br><span class="line">    &#125;,</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>
<p> 报错是，get is not defined，这就很疑惑了！</p>
</li>
</ol>
</li>
</ol>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>三天，学习<code>uniapp</code>，使用其组件，简单实现一个todos项目</p>
<p><img src="https://gitee.com/t0o-yang/Images/raw/master/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230320223136.jpg" alt="todos真机演示"></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/021todos%E5%88%9D%E7%89%88/" data-id="clfjqowuh000kewaa0h7h343e" data-title="021todos初版" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-020uniapp前端请求" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/020uniapp%E5%89%8D%E7%AB%AF%E8%AF%B7%E6%B1%82/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.843Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/22/020uniapp%E5%89%8D%E7%AB%AF%E8%AF%B7%E6%B1%82/">020uniapp前端请求</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>日志，各位看官就当乐子看吧。</p>
<p><strong>正经人谁写日记啊？！！</strong>    ——鹅城县长</p>
<p>uniapp项目，前端请求方式（或 常用插件）。后端是用<code>nodejs</code>创建的服务器。</p>
<h1 id="uni-request"><a href="#uni-request" class="headerlink" title="uni.request"></a>uni.request</h1><p>官方文档: <a target="_blank" rel="noopener" href="https://uniapp.dcloud.net.cn/api/request/request.html">发起请求</a></p>
<h1 id="axios"><a href="#axios" class="headerlink" title="axios"></a>axios</h1><p>vue项目，第一个想到的就是<code>axios</code>，使用了<code>uniapp-axios-adapter</code>这个插件，使用方式：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 业务代码中</span></span><br><span class="line"><span class="keyword">import</span> axios <span class="keyword">from</span> <span class="string">&quot;uniapp-axios-adapter&quot;</span>;</span><br><span class="line">axios.<span class="title function_">get</span>(&#123;</span><br><span class="line">  <span class="attr">url</span>: <span class="string">&quot;https://example.com/api/getUserById&quot;</span>,</span><br><span class="line">  <span class="attr">params</span>: &#123;</span><br><span class="line">    <span class="attr">id</span>: <span class="number">1</span>,</span><br><span class="line">  &#125;,</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>
<p>结果出错，<code>get</code>没有定义，最终选择了<code>uni-request</code>。</p>
<h1 id="todos"><a href="#todos" class="headerlink" title="todos"></a>todos</h1><p>计划：点击选择框，事项状态转为完成，需要完成的功能点：</p>
<ol>
<li>事件完成，图标需要换成<code>checkbox</code></li>
<li>文字删除线</li>
<li>输入框不可编辑</li>
<li>更新 leftCount</li>
</ol>
<p>	</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/020uniapp%E5%89%8D%E7%AB%AF%E8%AF%B7%E6%B1%82/" data-id="clfjqowug000jewaa5xx57jxk" data-title="020uniapp前端请求" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-019todos" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/019todos/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.837Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/22/019todos/">019todos</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>日志，各位看官就当乐子看吧。</p>
<p><strong>正经人谁写日记啊？！！</strong>    ——鹅城县长</p>
<h1 id="todos页面"><a href="#todos页面" class="headerlink" title="todos页面"></a>todos页面</h1><p>今天的<code>todos</code>项目有大进展，终于把大致样子构造出来了，但是有个大问题，列表上的前后按钮是直接用了<code>uni-easyinput</code>的<code>prefixIcon</code>和<code>suffixIcon</code>，虽然组件上有<code>iconClick</code>事件监听前后按钮点击，但是在得知点击的是前后哪个按钮后，无法传入其他参数，也就无法改变事项的状态了。</p>
<img src="https://gitee.com/t0o-yang/Images/raw/e60923799c94481b5a695d6b89930ffdbdd5b6f1/localhost_5173_(iPhone%20SE).png" title="" alt="todos页面" style="zoom:30%;" data-align="center">

<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>组件好用，但是当需要调整时，也是很难改的</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/019todos/" data-id="clfjqowug000iewaa9o4p6it5" data-title="019todos" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  
    <article id="post-018uniapp" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2023/03/22/018uniapp/" class="article-date">
  <time class="dt-published" datetime="2023-03-22T13:42:24.833Z" itemprop="datePublished">2023-03-22</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="p-name article-title" href="/2023/03/22/018uniapp/">018uniapp</a>
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>日志，各位看官就当乐子看吧。</p>
<p><strong>正经人谁写日记啊？！！</strong>    ——鹅城县长</p>
<p>看了黄子华的电影，还是觉得你最好，好看。今天没干什么，uniapp开发，不能达到想要的效果，难受。</p>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>隐式转换、vue响应式系统、相等和全等、浅拷贝和深拷贝、Promise、小程序</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2023/03/22/018uniapp/" data-id="clfjqowuf000hewaa4zfyczwr" data-title="018uniapp" class="article-share-link">Share</a>
      
      
      
    </footer>
  </div>
  
</article>



  


  <nav id="page-nav">
    
    <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><a class="extend next" rel="next" href="/page/2/">Next &raquo;</a>
  </nav>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/%E7%99%BE%E6%97%A5%E5%8D%9A%E5%AE%A2%E8%AE%A1%E5%88%92/">百日博客计划</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/ES6/" rel="tag">ES6</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/" rel="tag">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/uniapp/" rel="tag">uniapp</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/ES6/" style="font-size: 10px;">ES6</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/uniapp/" style="font-size: 10px;">uniapp</a> <a href="/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 10px;">前端</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/03/">March 2023</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2023/03/24/025uniapp-done/">025uniapp-done</a>
          </li>
        
          <li>
            <a href="/2023/03/23/024uniapp%E7%AC%AC%E4%B8%89%E5%A4%A9/">024uniapp第三天</a>
          </li>
        
          <li>
            <a href="/2023/03/22/023gitee-hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/">023gitee+hexo搭建个人博客</a>
          </li>
        
          <li>
            <a href="/2023/03/22/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8MDN%E6%96%87%E6%A1%A3/">(no title)</a>
          </li>
        
          <li>
            <a href="/2023/03/22/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95%E9%A2%98/">(no title)</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2023 John Doe<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.4.1.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>